package com.BMS.Service;

import java.util.Date;
import java.util.List;

import com.BMS.entity.Book;
import com.BMS.entity.Borrow;
import com.BMS.entity.GiveBack;

/**
 * 图书实体类业务层接口
 * 
 * @author lenovo
 *
 */
public interface BookService {
	// 图书实体类
	// add
	public void addBook(Book book, String manager_id, Date takeOn_date);

	// delete
	public void deleteBookById(String book_id);

	// takeOff
	// @param book_id, manager_id, takeOff_date
	public void takeOffBook(String book_id, String manager_id, Date takeOff_date);

	// find
	public Book findBookById(String book_id);

	public List<Book> findAllBooks(int offset, int length, String orderBy);

	// update
	public void updateBook(Book book);

	// getPageCount
	public long getPageCount();

	// 图书借阅实体类
	// add
	public void addBorrow(Borrow borrow);

	// delete
	public void deleteBorrow(int borrow_id);

	// find
	public Borrow findBorrowById(int borrow_id);

	public Borrow findBorrowByBookId(String book_id);

	// update
	public void updateBorrow(Borrow borrow);

	// get the status of book to borrow
	public boolean isBorrowable(String book_id);

	// 图书归还实体类
	// add
	public void addGiveBack(GiveBack giveBack);

	// delete
	public void deleteGiveBack(int giveBack_id);

	// find
	public Borrow findGiveBackById(int giveBack_id);

	// update
	public void updateGiveBack(GiveBack giveBack);

}
